from flask import Flask, render_template
from form import MyForm

app = Flask(__name__)
app.secret_key = "asdasd2123sad"  # flask_wtf的csrf要求的安全密钥


@app.route('/', methods=('GET', 'POST'))
def index():
    form = MyForm()
    if form.validate_on_submit():
        return '/success'
    return render_template('index.html', form=form)
